package com.red.star.wechat.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * @ProjectName: macalline-data-server$
 * @Package: com.red.star.macalline.data.entity$
 * @Description: 活动
 * @Author: AMGuo
 * @CreateDate: 2018/6/26$ 下午2:26$
 * @Version: 1.0
 */
@Data
@Table(name = "t_activity")
@ApiModel(value = "Activity", description = "活动")
public class Activity extends BaseEntity {

    /**
     * 活动名称
     */
    @ApiModelProperty(value = "活动名称")
    private String name;

    /**
     * 开始活动时间
     */
    @ApiModelProperty(value = "开始活动时间", dataType = "java.lang.String")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束活动时间
     */
    @ApiModelProperty(value = "结束活动时间", dataType = "java.lang.String")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 大区
     */
    @ApiModelProperty(value = "大区名称")
    @Transient
    private String bRegionName;

    /**
     * 大区
     */
    @ApiModelProperty(value = "大区code")
    @Transient
    private String bRegionCode;

    /**
     * 中区
     */
    @ApiModelProperty(value = "中区名称")
    @Transient
    private String mRegionName;

    /**
     * 中区
     */
    @ApiModelProperty(value = "中区code")
    @Transient
    private String mRegionCode;

    /**
     * 小区
     */
    @ApiModelProperty(value = "小区名称")
    @Transient
    private String sRegionName;

    /**
     * 小区
     */
    @ApiModelProperty(value = "小区code")
    @Transient
    private String sRegionCode;

    /**
     * 商场code
     */
    @ApiModelProperty(value = "商场code")
    private String mallCode;

    /**
     * 商场name
     */
    @ApiModelProperty(value = "商场name")
    @Transient
    private String mallName;

    /**
     * 状态：0 启用 1 停用 2 删除
     */
    @ApiModelProperty(value = "状态：0 启用 1 停用 2 删除", example = "0")
    private Integer status;

    /**
     * 创建人adminId
     */
    @ApiModelProperty(value = "创建人adminId", example = "0")
    private Integer createAdminId;

    /**
     * synchro_id
     */
    @ApiModelProperty(value = "synchro_id", example = "0")
    private Integer redStarId;

    /**
     * 活动开始时间
     */
    @Transient
    private Date startTimeDate;

    /**
     * 活动结束时间
     */
    @Transient
    private Date endTimeDate;

}
